<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="../header.jsp">
	<jsp:param value="组织-学员管理 " name="title" />
</jsp:include>
<link href="static/css/base-css.css" rel="stylesheet" type="text/css">
<link href="static/css/teacher.css" rel="stylesheet" type="text/css">
<link href="static/css/position.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="static/js/postion.js"></script>
</head>
<body>
	<jsp:include page="../menu/manage_menu.jsp"></jsp:include>
	<div class="teacher-content" style="margin-right: 100px;">
		<table class="ui celled striped table">
			<thead>
				<tr>
					<th colspan="4">
						<span>职位列表</span>
						<span style="margin-left: 50px;">${error}</span>
					</th>
				</tr>
				<tr>
					<th colspan="4">
							<div class="ui buttons" style="float:left;">
								<a href="position/form" class="ui button" style="color:#fff; background: #666;">
								 <i class="icon user"></i>
									创建职位
								</a>
								<button class="ui button" id="delete">
									<i class="icon trash"></i> 删除职位
								</button>
							</div>
						<div class="searcher" style="float:right;">
							<form action="position/manager">
								<div class="ui form">
									<div class="fields">
										<div class="field">
											<input type="text" name="pname" placeholder="输入职位搜索"
												value="${param.pname}">
										</div>
										<div class="field">
											<input type="text" name="pdiscrible" placeholder="输入描述搜索"
												value="${param.pdiscrible }">
										</div>
										<div class="field">
											<button class="ui submit button">检索</button>
										</div>
									</div>
								</div>
							</form>
						</div>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr id="tr2">
					<td class="collapsing">
						<div class="ui checkbox">
							<input type="checkbox" id="checkAll">
						</div>
					</td>
					<td>职位名称</td>
					<td>职位描述</td>
					<td>操作</td>
					<td class="collapsing">&nbsp;</td>
				</tr>
				<c:forEach items="${positionList }" var="position">
					<tr id="tr2">
						<td class="collapsing">
							<div class="ui checkbox">
								<input class="item-check" type="checkbox"
									value="${position.id }">
							</div> 
						</td>
						<td class="collapsing">${position.pname}</td>
						<td class="collapsing">${position.pdiscrible}</td>
						<td class="collapsing colspan='2' "><a
							onclick="return confirm('确认删除？')" class="ui label" style="color:#fff; background: #666;"
							href="position/delete?id=${position.id}"> <i
								class="icon trash"></i> 删除
						</a> &nbsp;<a class="ui label"
							href="position/form?id=${position.id}"> <i class="icon write"></i>
								修改
						</a></td>

					</tr>
				</c:forEach>
				<c:if test="${empty positionList}">
					<tr>
						<td style="text-align: center;" colspan="8">暂无记录</td>
					</tr>
				</c:if>
			</tbody>
		</table>
		<c:if test="${totalPage > 1 }">
			<div class="page">
				<a <c:if test="${page!=1}">href="position/manager?page=1${queryString}"</c:if>
					class="${page == 1?'disable':''}" style="color:#666"><i class="fast backward icon"></i>首页
				</a>
				<a <c:if test="${page!=1}">href="position/manager?page=${page-1}${queryString}"</c:if>
					class="${page == 1?'disable':''}" style="color:#666"><i class="backward icon"></i>上一页
				</a>
				<a <c:if test="${page!=totalPage}">href="position/manager?page=${page+1 }${queryString}"</c:if>
					class="${page == totalPage?'disable':''}" style="color:#666">下一页<i class="forward icon"></i>
				</a>
				<a <c:if test="${page!=totalPage}">href="position/manager?page=${totalPage }${queryString}"</c:if>
					class="${page == totalPage?'disable':''}" style="color:#666">尾页<i class="fast forward icon"></i>
				</a>
				<span style="float:right">${page}/${totalPage }</span>
					
			</div>
		</c:if>
	</div>
</body>
</html>